
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>14.3flutter开发鸿蒙PC应用 · Flutter for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="14.4探索适用于鸿蒙原生应用的跨平台开发框架.html" />
    
    
    <link rel="prev" href="14.2使用url_launcher.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.nutpi.net/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.arkui.club/" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">哔哩哔哩</a>
      </li><li>
        <a href="https://gitcode.com/nutpi" target="_blank">GitCode</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    1.前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../坚果派介绍.html">
            
                <a href="../坚果派介绍.html">
            
                    
                    2.坚果派介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter3/">
            
                <a href="../chapter3/">
            
                    
                    3.Flutter与Dart介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter3/3.1Flutter介绍.html">
            
                <a href="../chapter3/3.1Flutter介绍.html">
            
                    
                    3.1 Flutter介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter3/3.2Dart介绍.html">
            
                <a href="../chapter3/3.2Dart介绍.html">
            
                    
                    3.2 Dart介绍
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../chapter4/">
            
                <a href="../chapter4/">
            
                    
                    4.HarmonyOS/OpenHarmony与ArkTS介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../chapter4/4.1HarmonyOS.html">
            
                <a href="../chapter4/4.1HarmonyOS.html">
            
                    
                    4.1 HarmonyOS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../chapter4/4.2OpenHarmony.html">
            
                <a href="../chapter4/4.2OpenHarmony.html">
            
                    
                    4.2 OpenHarmony
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../chapter4/4.3HarmonyOSNEXT.html">
            
                <a href="../chapter4/4.3HarmonyOSNEXT.html">
            
                    
                    4.3 HarmonyOS NEXT
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../chapter4/4.4ArkTS语言.md">
            
                <span>
            
                    
                    4.4 ArkTS语言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../chapter4/4.5三者的差异.html">
            
                <a href="../chapter4/4.5三者的差异.html">
            
                    
                    4.5 三者的区别与联系
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../chapter5/">
            
                <a href="../chapter5/">
            
                    
                    5.Flutter鸿蒙化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../chapter5/5.1背景.md">
            
                <span>
            
                    
                    5.1 背景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../chapter5/5.2原理.md">
            
                <span>
            
                    
                    5.2 原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../chapter5/5.3Impeller渲染引擎.md">
            
                <span>
            
                    
                    5.3 Impeller渲染引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../chapter6/">
            
                <a href="../chapter6/">
            
                    
                    6.鸿蒙Flutter开发环境配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../chapter6/6.1windows环境配置.md">
            
                <span>
            
                    
                    6.1 Windows环境配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../chapter6/6.2mac环境配置.md">
            
                <span>
            
                    
                    6.2 Mac环境配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../chapter6/6.3使用FlutterSDK_3.22.1.md">
            
                <span>
            
                    
                    6.3 使用FlutterSDK 3.22.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../chapter6/6.4第一个鸿蒙Flutter应用程序.md">
            
                <span>
            
                    
                    6.4 第一个鸿蒙Flutter应用程序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../chapter6/6.5运行到多平台.md">
            
                <span>
            
                    
                    6.5 运行到多平台
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../chapter6/6.6OpenHarmony设备运行指导.md">
            
                <span>
            
                    
                    6.6 OpenHarmony设备运行指导
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../chapter6/6.7现有Flutter项目支持鸿蒙.md">
            
                <span>
            
                    
                    6.7 现有Flutter项目支持鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="../chapter6/6.8鸿蒙版Flutter仓库变更.md">
            
                <span>
            
                    
                    6.8 鸿蒙版Flutter仓库变更
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../chapter6/6.9使用FVM管理.md">
            
                <span>
            
                    
                    6.9 使用FVM管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="../chapter6/6.10使用最新FlutterSDK配置开发环境.md">
            
                <span>
            
                    
                    6.10 使用最新FlutterSDK配置开发环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11" data-path="../chapter6/6.11真机与模拟器.md">
            
                <span>
            
                    
                    6.11 真机与模拟器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../chapter7/">
            
                <a href="../chapter7/">
            
                    
                    7.在鸿蒙应用中添加Flutter页面
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../chapter7/7.1如何使用 FlutterPage.html">
            
                <a href="../chapter7/7.1如何使用 FlutterPage.html">
            
                    
                    7.1如何使用 FlutterPage
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../chapter7/7.2如何使用混合开发添加跳转 FlutterEntry.html">
            
                <a href="../chapter7/7.2如何使用混合开发添加跳转 FlutterEntry.html">
            
                    
                    7.2如何使用混合开发添加跳转 FlutterEntry
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../chapter7/7.3 harmonyos添加flutter页面跳转时路由的处理.html">
            
                <a href="../chapter7/7.3 harmonyos添加flutter页面跳转时路由的处理.html">
            
                    
                    7.3 harmonyos添加flutter页面跳转时路由的处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../chapter7/7.4使用 Flutter Channel实现和Flutter和HarmonyOS交互.html">
            
                <a href="../chapter7/7.4使用 Flutter Channel实现和Flutter和HarmonyOS交互.html">
            
                    
                    7.4使用 Flutter Channel实现和Flutter和HarmonyOS交互
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../chapter8/">
            
                <a href="../chapter8/">
            
                    
                    8.在鸿蒙应用中使用Flutter Channel能力
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../chapter8/8.1如何使用Flutter与鸿蒙通信 FlutterChannel.md">
            
                <span>
            
                    
                    8.1如何使用Flutter与鸿蒙通信 FlutterChannel
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../chapter8/8.2如何使用混合开发添加跳转 FlutterEntry.html">
            
                <a href="../chapter8/8.2如何使用混合开发添加跳转 FlutterEntry.html">
            
                    
                    8.2如何使用混合开发添加跳转 FlutterEntry
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../chapter8/8.3如何使用lutter和鸿蒙next混合渲染.html">
            
                <a href="../chapter8/8.3如何使用lutter和鸿蒙next混合渲染.html">
            
                    
                    8.3如何使用Flutter和鸿蒙NEXT混合渲染
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../chapter8/8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例.html">
            
                <a href="../chapter8/8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例.html">
            
                    
                    8.4 混合渲染开发实践：以 fluttertpc_scan 三方库为例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../chapter8/8.5如何使用Flutter与鸿蒙通信 FlutterChannel.html">
            
                <a href="../chapter8/8.5如何使用Flutter与鸿蒙通信 FlutterChannel.html">
            
                    
                    8.5如何使用Flutter与鸿蒙通信 FlutterChannel
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../chapter9/">
            
                <a href="../chapter9/">
            
                    
                    9.与原生混合渲染
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../chapter9/9.1外接纹理适配.html">
            
                <a href="../chapter9/9.1外接纹理适配.html">
            
                    
                    9.1Flutter OHOS外接纹理适配简介.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../chapter9/9.2如何使用多引擎 FlutterEngineGroup.html">
            
                <a href="../chapter9/9.2如何使用多引擎 FlutterEngineGroup.html">
            
                    
                    9.2如何使用多引擎 FlutterEngineGroup
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../chapter9/9.3如何使用PlatformView.html">
            
                <a href="../chapter9/9.3如何使用PlatformView.html">
            
                    
                    9.3如何使用PlatformView
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../chapter9/9.4PlatformView同层渲染方案适配切换指导.html">
            
                <a href="../chapter9/9.4PlatformView同层渲染方案适配切换指导.html">
            
                    
                    9.4PlatformView同层渲染方案适配切换指导
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <span>
            
                    
                    9.5如何使用混合开发 module
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../chapter10/">
            
                <a href="../chapter10/">
            
                    
                    10.开发Flutter静态库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/如何使用混合开发 module.md">
            
                    
                    10.1开发module
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发package.md">
            
                    
                    10.2开发package
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发plugin.md">
            
                    
                    10.3开发plugin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <a target="_blank" href="https://gitcode.com/openharmony-sig/flutter_samples/blob/master/ohos/docs/04_development/开发FFI plugin.md">
            
                    
                    10.4开发FFI plugin
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../chapter11/">
            
                <a href="../chapter11/">
            
                    
                    11.Packages使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../chapter11/11.1高效使用 Packages指南.html">
            
                <a href="../chapter11/11.1高效使用 Packages指南.html">
            
                    
                    11.1高效使用 Packages指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11.2" data-path="../chapter11/11.2发布Packages.html">
            
                <a href="../chapter11/11.2发布Packages.html">
            
                    
                    11.2发布Packages
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../chapter12/">
            
                <a href="../chapter12/">
            
                    
                    12.鸿蒙适配Flutter三方库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="../chapter12/12.1纯dart库无需迁移.html">
            
                <a href="../chapter12/12.1纯dart库无需迁移.html">
            
                    
                    12.1纯dart库无需迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="../chapter12/12.2坚果派已适配的库">
            
                <span>
            
                    
                    12.2坚果派目前适配三方库进展
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="../chapter12/12.3适配三方库之FlutterToast.html">
            
                <a href="../chapter12/12.3适配三方库之FlutterToast.html">
            
                    
                    12.3适配三方库之FlutterToast
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="../chapter12/12.4适配适配三方库之udid.md">
            
                <span>
            
                    
                    12.4适配三方库之udid
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="../chapter12/12.5适配torch_light.html">
            
                <a href="../chapter12/12.5适配torch_light.html">
            
                    
                    12.5适配torch_light.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="../chapter12/12.6适配flutter_native_contact_picker.html">
            
                <a href="../chapter12/12.6适配flutter_native_contact_picker.html">
            
                    
                    12.6适配flutter_native_contact_picker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="../chapter12/12.7适配flutter_timezone.html">
            
                <a href="../chapter12/12.7适配flutter_timezone.html">
            
                    
                    12.7适配flutter_timezone.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.8" data-path="../chapter12/12.8适配flutter_exit_app.html">
            
                <a href="../chapter12/12.8适配flutter_exit_app.html">
            
                    
                    12.8适配flutter_exit_app.md
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.9" data-path="../chapter12/12.9适配flutter_phone_direct_caller.html">
            
                <a href="../chapter12/12.9适配flutter_phone_direct_caller.html">
            
                    
                    12.9适配flutter_phone_direct_caller
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.10" data-path="../chapter12/12.10适配flutter_app_icon_badge.html">
            
                <a href="../chapter12/12.10适配flutter_app_icon_badge.html">
            
                    
                    12.10适配flutter_app_icon_badge
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12.11" data-path="../chapter12/12.11适配memory_info.html">
            
                <a href="../chapter12/12.11适配memory_info.html">
            
                    
                    12.11适配memory_info
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../chapter13/">
            
                <a href="../chapter13/">
            
                    
                    13.性能优化与调试
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../chapter13/13.1DevTool使用.md">
            
                <span>
            
                    
                    13.1DevTool使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../chapter13/13.2性能分析定界指南.html">
            
                <a href="../chapter13/13.2性能分析定界指南.html">
            
                    
                    13.2性能分析定界(OpenHarmony平台)指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="../chapter13/13.3梳理线程顺序.html">
            
                <a href="../chapter13/13.3梳理线程顺序.html">
            
                    
                    13.3性能分析第一步-梳理线程顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4" data-path="../chapter13/13.4滑动响应时延.html">
            
                <a href="../chapter13/13.4滑动响应时延.html">
            
                    
                    13.4性能分析-滑动响应时延
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.5" data-path="../chapter13/13.5帧渲染跟踪.html">
            
                <a href="../chapter13/13.5帧渲染跟踪.html">
            
                    
                    13.5性能分析-帧渲染跟踪
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.6" data-path="../chapter13/13.6如何调试代码.html">
            
                <a href="../chapter13/13.6如何调试代码.html">
            
                    
                    13.6如何调试代码
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="./">
            
                <a href="./">
            
                    
                    14.迁移实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="14.1拨打电话.html">
            
                <a href="14.1拨打电话.html">
            
                    
                    14.1拨打电话
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="14.2使用url_launcher.html">
            
                <a href="14.2使用url_launcher.html">
            
                    
                    14.2使用url_launcher
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.14.3" data-path="14.3flutter开发鸿蒙PC应用.html">
            
                <a href="14.3flutter开发鸿蒙PC应用.html">
            
                    
                    14.3flutter开发鸿蒙PC应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.4" data-path="14.4探索适用于鸿蒙原生应用的跨平台开发框架.html">
            
                <a href="14.4探索适用于鸿蒙原生应用的跨平台开发框架.html">
            
                    
                    14.4探索适用于鸿蒙原生应用的跨平台开发框架
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.5" data-path="14.5保存图片.html">
            
                <a href="14.5保存图片.html">
            
                    
                    14.5保存图片
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.6" data-path="14.6使用url.html">
            
                <a href="14.6使用url.html">
            
                    
                    14.6使用url
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="../chapter15/">
            
                <a href="../chapter15/">
            
                    
                    15.上架审核
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.15.1" data-path="../chapter15/15.1应用上架流程.html">
            
                <a href="../chapter15/15.1应用上架流程.html">
            
                    
                    15.1应用上架流程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15.2" data-path="../chapter15/15.2审核注意事项.html">
            
                <a href="../chapter15/15.2审核注意事项.html">
            
                    
                    15.2审核注意事项
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="../chapter16/">
            
                <a href="../chapter16/">
            
                    
                    16.FAQ
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" data-path="../chapter16/16.5环境相关问题.html">
            
                <a href="../chapter16/16.5环境相关问题.html">
            
                    
                    16.1环境相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.2" data-path="../chapter16/16.6ohos代码开发相关问题.html">
            
                <a href="../chapter16/16.6ohos代码开发相关问题.html">
            
                    
                    16.2ohos代码开发相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.3" data-path="../chapter16/16.3权限相关.html">
            
                <a href="../chapter16/16.3权限相关.html">
            
                    
                    16.3权限相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.4" data-path="../chapter16/16.2原有项目迁移鸿蒙.html">
            
                <a href="../chapter16/16.2原有项目迁移鸿蒙.html">
            
                    
                    16.4原有项目迁移鸿蒙
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.5" data-path="../chapter16/16.1ohos应用编译相关问题.html">
            
                <a href="../chapter16/16.1ohos应用编译相关问题.html">
            
                    
                    16.5ohos应用编译相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.6" data-path="../chapter16/16.6ohos运行相关问题.md">
            
                <span>
            
                    
                    16.6ohos运行相关问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.7" data-path="../chapter16/16.7解析flutter相关的cppcrash堆栈.html">
            
                <a href="../chapter16/16.7解析flutter相关的cppcrash堆栈.html">
            
                    
                    16.7解析flutter相关的cppcrash堆栈
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16.8" data-path="../chapter16/16.8ohos引擎产物编译相关问题.html">
            
                <a href="../chapter16/16.8ohos引擎产物编译相关问题.html">
            
                    
                    ohos引擎产物编译相关问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="../chapter17/">
            
                <a href="../chapter17/">
            
                    
                    17.阅读更多
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.17.1" data-path="../chapter17/17.1版本.html">
            
                <a href="../chapter17/17.1版本.html">
            
                    
                    17.1版本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.2" data-path="../chapter17/17.2平台判断与问题处理指南.html">
            
                <a href="../chapter17/17.2平台判断与问题处理指南.html">
            
                    
                    17.2平台判断与问题处理指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.3" data-path="../chapter17/17.3鸿蒙版Flutter 3.22.0版本正式发布(1.0Release">
            
                <span>
            
                    
                    17.3鸿蒙版Flutter 3.22.0版本正式发布(1.0Release)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.4" data-path="../chapter17/17.4优化 ohos 构建过程.html">
            
                <a href="../chapter17/17.4优化 ohos 构建过程.html">
            
                    
                    17.4优化 ohos 构建过程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17.5" data-path="../chapter17/17.5新增use-application-binary命令.html">
            
                <a href="../chapter17/17.5新增use-application-binary命令.html">
            
                    
                    17.5新增use-application-binary命令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="../chapter18/">
            
                <a href="../chapter18/">
            
                    
                    18.多设备能力
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" data-path="../chapter18/18.1多设备自适应布局.html">
            
                <a href="../chapter18/18.1多设备自适应布局.html">
            
                    
                    18.1自适应布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.2" data-path="../chapter18/18.2多设备响应式布局.html">
            
                <a href="../chapter18/18.2多设备响应式布局.html">
            
                    
                    18.2响应式布局
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.3" data-path="../chapter18/18.3多设备典型布局场景.html">
            
                <a href="../chapter18/18.3多设备典型布局场景.html">
            
                    
                    18.3典型布局场景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18.4" data-path="../chapter18/184Flutter交互归一能力.md">
            
                <span>
            
                    
                    18.4交互归一
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="../chapter20/">
            
                <a href="../chapter20/">
            
                    
                    20.版本更新
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.19.1" data-path="../chapter20/20.1Flutter 3.22.0-ohos 1.0.1 Release发布.html">
            
                <a href="../chapter20/20.1Flutter 3.22.0-ohos 1.0.1 Release发布.html">
            
                    
                    20.1Flutter 3.22.0-ohos 1.0.1 Release发布
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.20" >
            
                <span>
            
                    
                    19.关于未来
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.20.1" data-path="../致谢.html">
            
                <a href="../致谢.html">
            
                    
                    致谢
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >14.3flutter开发鸿蒙PC应用</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h2 id="&#x7528;flutter&#x5F00;&#x53D1;&#x9E3F;&#x8499;pc&#x5E94;&#x7528;"><a name="&#x7528;flutter&#x5F00;&#x53D1;&#x9E3F;&#x8499;pc&#x5E94;&#x7528;" class="plugin-anchor" href="#&#x7528;flutter&#x5F00;&#x53D1;&#x9E3F;&#x8499;pc&#x5E94;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7528;Flutter&#x5F00;&#x53D1;&#x9E3F;&#x8499;PC&#x5E94;&#x7528;</h2>
<h2 id="&#x6458;&#x8981;"><a name="&#x6458;&#x8981;" class="plugin-anchor" href="#&#x6458;&#x8981;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6458;&#x8981;</h2>
<p>&#x672C;&#x6587;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x63D0;&#x4F9B;&#x4E86;&#x4F7F;&#x7528; Flutter &#x5F00;&#x53D1;&#x9E3F;&#x8499; PC &#x5E94;&#x7528;&#x7684;&#x5168;&#x9762;&#x6307;&#x5357;&#x3002;&#x6DB5;&#x76D6;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#x3001;&#x9879;&#x76EE;&#x521B;&#x5EFA;&#x4E0E;&#x914D;&#x7F6E;&#x3001;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x3001;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;&#x4EE5;&#x53CA;&#x8C03;&#x8BD5;&#x6D4B;&#x8BD5;&#x7B49;&#x73AF;&#x8282;&#xFF0C;&#x540C;&#x65F6;&#x5F3A;&#x8C03;&#x9002;&#x914D;&#x9E3F;&#x8499; PC &#x754C;&#x9762;&#x89C4;&#x8303;&#x548C;&#x8C03;&#x7528;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x7684;&#x65B9;&#x6CD5;&#x3002;&#x8FD8;&#x5206;&#x4EAB;&#x4E86;&#x5B9E;&#x7528;&#x7684;&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#x3001;&#x76F8;&#x5173;&#x8D44;&#x6E90;&#x94FE;&#x63A5;&#xFF0C;&#x5E76;&#x4ECB;&#x7ECD;&#x4E86;&#x575A;&#x679C;&#x6D3E;&#x56E2;&#x961F;&#x53CA;&#x5176;&#x6280;&#x672F;&#x8D44;&#x6E90;&#xFF0C;&#x5E2E;&#x52A9;&#x5F00;&#x53D1;&#x8005;&#x9AD8;&#x6548;&#x5730;&#x6784;&#x5EFA;&#x9E3F;&#x8499; PC &#x5E94;&#x7528;&#x3002;</p>
<h2 id="&#x4E00;&#x3001;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;"><a name="&#x4E00;&#x3001;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;" class="plugin-anchor" href="#&#x4E00;&#x3001;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E00;&#x3001;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;</h2>
<h3 id="&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x8F6F;&#x4EF6;"><a name="&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x8F6F;&#x4EF6;" class="plugin-anchor" href="#&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x8F6F;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x8F6F;&#x4EF6;</h3>
<p>&#x5728;&#x5F00;&#x59CB;&#x5F00;&#x53D1;&#x4E4B;&#x524D;&#xFF0C;&#x9700;&#x8981;&#x786E;&#x4FDD;&#x7535;&#x8111;&#x4E0A;&#x5DF2;&#x5B89;&#x88C5;&#x4EE5;&#x4E0B;&#x8F6F;&#x4EF6;&#x3002;&#x5BF9;&#x4E8E;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x5F00;&#x53D1;&#xFF0C;&#x9700;&#x8981;&#x5B89;&#x88C5;&#x9E3F;&#x8499;&#x5F00;&#x53D1;&#x5DE5;&#x5177;&#xFF0C;&#x5982; DevEco Studio &#x7B49;&#x3002;&#x540C;&#x65F6;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x5B89;&#x88C5; Git&#xFF0C;&#x5B83;&#x7528;&#x4E8E;&#x7248;&#x672C;&#x63A7;&#x5236;&#x548C;&#x83B7;&#x53D6; Flutter SDK &#x7B49;&#x8D44;&#x6E90;&#x3002;</p>
<h3 id="&#x914D;&#x7F6E;-flutter-sdk"><a name="&#x914D;&#x7F6E;-flutter-sdk" class="plugin-anchor" href="#&#x914D;&#x7F6E;-flutter-sdk"><i class="fa fa-link" aria-hidden="true"></i></a>&#x914D;&#x7F6E; Flutter SDK</h3>
<p>&#x4ECE;&#x5B98;&#x65B9;&#x6307;&#x5B9A;&#x5730;&#x5740;&#x4E0B;&#x8F7D; Flutter SDK&#xFF0C;&#x5982;&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x6267;&#x884C;&#x547D;&#x4EE4; </p>
<pre><code>git clone https://gitcode.com/openharmony-sig/flutter_flutter
git checkout -b 3.22.0-ohos origin/3.22.0-ohos
</code></pre><p>&#x514B;&#x9686; Flutter SDK &#x5230;&#x6307;&#x5B9A;&#x76EE;&#x5F55;&#x3002;&#x63A5;&#x7740;&#xFF0C;&#x914D;&#x7F6E;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF0C;&#x5728; <code>~/.bash_profile</code> &#x6587;&#x4EF6;&#x4E2D;&#x589E;&#x52A0;&#x76F8;&#x5E94;&#x7684; Flutter Mirror&#x3001;HarmonyOS SDK &#x7B49;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF0C;&#x5982; <code>export PUB_HOSTED_URL=https://pub.flutter-io.cn</code> &#x7B49;&#xFF0C;&#x914D;&#x7F6E;&#x5B8C;&#x6210;&#x540E;&#xFF0C;&#x901A;&#x8FC7; <code>flutter doctor</code> &#x547D;&#x4EE4;&#x68C0;&#x67E5;&#x662F;&#x5426;&#x914D;&#x7F6E;&#x6210;&#x529F;&#x3002;</p>
<p>&#x6BD4;&#x5982;&#x6211;&#x7684;&#xFF1A;</p>
<pre><code class="lang-js">jianguo@nutpi flutter % flutter doctor -v
[!] Flutter (Channel [user-branch], 3.22.1-ohos-1.0.0, on macOS 13.4.1 22F82 darwin-arm64, locale zh-Hans-CN)
    ! Flutter version 3.22.1-ohos-1.0.0 on channel [user-branch] at /Users/jianguo/huawei/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn&apos;t fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository git@gitcode.com:openharmony-sig/flutter_flutter.git is not the same as FLUTTER_GIT_URL
    &#x2022; FLUTTER_GIT_URL = https://gitcode.com/openharmony-sig/flutter_flutter.git
    &#x2022; Framework revision 13a3494e71 (2 minutes ago), 2025-05-15 21:21:44 +0800
    &#x2022; Engine revision f6344b75dc
    &#x2022; Dart version 3.4.0
    &#x2022; DevTools version 2.34.1
    &#x2022; Pub download mirror https://pub.flutter-io.cn
    &#x2022; Flutter download mirror https://storage.flutter-io.cn
    &#x2022; If those were intentional, you can disregard the above warnings; however it is recommended to use &quot;git&quot; directly to perform update checks and upgrades.

[&#x2713;] HarmonyOS toolchain - develop for HarmonyOS devices
    &#x2022; OpenHarmony Sdk at /Users/jianguo/Library/OpenHarmony/Sdk, available api versions has [15:15, 12:12]
    &#x2022; Ohpm version 5.0.16
    &#x2022; Node version v18.20.1
    &#x2022; Hvigorw binary at /Applications/DevEco-Studio.app/Contents/tools/hvigor/bin/hvigorw

[&#x2713;] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    &#x2022; Android SDK at /Users/jianguo/Library/Android/sdk
    &#x2022; Platform android-34, build-tools 34.0.0
    &#x2022; ANDROID_HOME = /Users/jianguo/Library/Android/sdk
    &#x2022; Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    &#x2022; Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    &#x2022; All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    &#x2022; Xcode at /Applications/Xcode.app/Contents/Developer
    &#x2022; Build 14E300c
    ! Flutter recommends a minimum Xcode version of 15.
      Download the latest version or update via the Mac App Store.
    &#x2022; CocoaPods version 1.16.2

[&#x2713;] Chrome - develop for the web
    &#x2022; Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[&#x2713;] Android Studio (version 2022.3)
    &#x2022; Android Studio at /Applications/Android Studio.app/Contents
    &#x2022; Flutter plugin can be installed from:
      &#x1F528; https://plugins.jetbrains.com/plugin/9212-flutter
    &#x2022; Dart plugin can be installed from:
      &#x1F528; https://plugins.jetbrains.com/plugin/6351-dart
    &#x2022; Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[&#x2713;] VS Code (version 1.100.1)
    &#x2022; VS Code at /Applications/Visual Studio Code.app/Contents
    &#x2022; Flutter extension version 3.110.0

&#x28FE;
</code></pre>
<h2 id="&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9879;&#x76EE;"><a name="&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9879;&#x76EE;" class="plugin-anchor" href="#&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9879;&#x76EE;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E8C;&#x3001;&#x521B;&#x5EFA;&#x9879;&#x76EE;</h2>
<h3 id="&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x884C;&#x521B;&#x5EFA;"><a name="&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x884C;&#x521B;&#x5EFA;" class="plugin-anchor" href="#&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x884C;&#x521B;&#x5EFA;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528;&#x547D;&#x4EE4;&#x884C;&#x521B;&#x5EFA;</h3>
<p>&#x5728;&#x7EC8;&#x7AEF;&#x4E2D;&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x5B58;&#x653E;&#x76EE;&#x5F55;&#xFF0C;&#x6267;&#x884C;&#x547D;&#x4EE4; <code>flutter create --platforms ohos &#x9879;&#x76EE;&#x540D;&#x79F0;</code> &#x521B;&#x5EFA;&#x65B0;&#x7684; Flutter &#x9879;&#x76EE;&#xFF0C;&#x8BE5;&#x547D;&#x4EE4;&#x4F1A;&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x76F8;&#x5173;&#x914D;&#x7F6E;&#x7684;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x6267;&#x884C; <code>flutter create --platforms ohos my_harmony_app</code>&#xFF0C;&#x5C31;&#x4F1A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; &#x201C;my_harmony_app&#x201D; &#x7684;&#x9879;&#x76EE;&#x3002;</p>
<p>&#x521B;&#x5EFA;&#x591A;&#x5E73;&#x53F0;</p>
<pre><code>flutter create myflutterapp
</code></pre><h2 id="&#x4E09;&#x3001;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4E0E;&#x914D;&#x7F6E;"><a name="&#x4E09;&#x3001;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4E0E;&#x914D;&#x7F6E;" class="plugin-anchor" href="#&#x4E09;&#x3001;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4E0E;&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E09;&#x3001;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4E0E;&#x914D;&#x7F6E;</h2>
<h3 id="&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4ECB;&#x7ECD;"><a name="&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4ECB;&#x7ECD;" class="plugin-anchor" href="#&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4ECB;&#x7ECD;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4ECB;&#x7ECD;</h3>
<p>&#xFF1A;Flutter &#x9E3F;&#x8499;&#x9879;&#x76EE;&#x7684;&#x4E3B;&#x8981;&#x7ED3;&#x6784;&#x5305;&#x62EC; <code>lib</code> &#x76EE;&#x5F55;&#x5B58;&#x653E; Dart &#x4EE3;&#x7801;&#x3001;<code>pubspec.yaml</code> &#x6587;&#x4EF6;&#x7528;&#x4E8E;&#x9879;&#x76EE;&#x914D;&#x7F6E;&#x548C;&#x4F9D;&#x8D56;&#x7BA1;&#x7406;&#x3001;<code>ohos</code> &#x76EE;&#x5F55;&#x5B58;&#x653E;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x7279;&#x5B9A;&#x7684;&#x8D44;&#x6E90;&#x548C;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7B49;&#x3002;&#x5176;&#x4E2D;&#xFF0C;<code>lib</code> &#x76EE;&#x5F55;&#x4E0B;&#x7684; <code>main.dart</code> &#x6587;&#x4EF6;&#x662F;&#x5E94;&#x7528;&#x7684;&#x5165;&#x53E3;&#x6587;&#x4EF6;&#x3002;</p>
<pre><code class="lang-json">jianguo@nutpi  % tree -L <span class="hljs-number">2</span>
.
&#x251C;&#x2500;&#x2500; LICENSE
&#x251C;&#x2500;&#x2500; README.md
&#x251C;&#x2500;&#x2500; analysis_options.yaml
&#x251C;&#x2500;&#x2500; android
&#x2502;   &#x251C;&#x2500;&#x2500; app
&#x2502;   &#x251C;&#x2500;&#x2500; build.gradle
&#x2502;   &#x251C;&#x2500;&#x2500; gradle
&#x2502;   &#x251C;&#x2500;&#x2500; gradle.properties
&#x2502;   &#x251C;&#x2500;&#x2500; local.properties
&#x2502;   &#x2514;&#x2500;&#x2500; settings.gradle
&#x251C;&#x2500;&#x2500; build
&#x2502;   &#x251C;&#x2500;&#x2500; <span class="hljs-number">1</span>bcac9131f185b5e8bd0f600f6ffecf8.cache.dill.track.dill
&#x2502;   &#x251C;&#x2500;&#x2500; eaa3fb6bcb4ef7f7f7d2474c436521fe
&#x2502;   &#x2514;&#x2500;&#x2500; ohos
&#x251C;&#x2500;&#x2500; ios
&#x2502;   &#x251C;&#x2500;&#x2500; Flutter
&#x2502;   &#x251C;&#x2500;&#x2500; Podfile
&#x2502;   &#x251C;&#x2500;&#x2500; Runner
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcodeproj
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcworkspace
&#x2502;   &#x2514;&#x2500;&#x2500; RunnerTests
&#x251C;&#x2500;&#x2500; lib
&#x2502;   &#x251C;&#x2500;&#x2500; main.dart
&#x2502;   &#x251C;&#x2500;&#x2500; models
&#x2502;   &#x251C;&#x2500;&#x2500; pages
&#x2502;   &#x2514;&#x2500;&#x2500; services
&#x251C;&#x2500;&#x2500; linux
&#x2502;   &#x251C;&#x2500;&#x2500; CMakeLists.txt
&#x2502;   &#x251C;&#x2500;&#x2500; flutter
&#x2502;   &#x251C;&#x2500;&#x2500; main.cc
&#x2502;   &#x251C;&#x2500;&#x2500; my_application.cc
&#x2502;   &#x2514;&#x2500;&#x2500; my_application.h
&#x251C;&#x2500;&#x2500; macos
&#x2502;   &#x251C;&#x2500;&#x2500; Flutter
&#x2502;   &#x251C;&#x2500;&#x2500; Podfile
&#x2502;   &#x251C;&#x2500;&#x2500; Runner
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcodeproj
&#x2502;   &#x251C;&#x2500;&#x2500; Runner.xcworkspace
&#x2502;   &#x2514;&#x2500;&#x2500; RunnerTests
&#x251C;&#x2500;&#x2500; ohos
&#x2502;   &#x251C;&#x2500;&#x2500; AppScope
&#x2502;   &#x251C;&#x2500;&#x2500; build-profile.json5
&#x2502;   &#x251C;&#x2500;&#x2500; entry
&#x2502;   &#x251C;&#x2500;&#x2500; har
&#x2502;   &#x251C;&#x2500;&#x2500; hvigor
&#x2502;   &#x251C;&#x2500;&#x2500; hvigorfile.ts
&#x2502;   &#x251C;&#x2500;&#x2500; local.properties
&#x2502;   &#x251C;&#x2500;&#x2500; oh-package-lock.json5
&#x2502;   &#x251C;&#x2500;&#x2500; oh-package.json5
&#x2502;   &#x2514;&#x2500;&#x2500; oh_modules
&#x251C;&#x2500;&#x2500; pubspec.lock
&#x251C;&#x2500;&#x2500; pubspec.yaml
&#x251C;&#x2500;&#x2500; test
&#x2502;   &#x2514;&#x2500;&#x2500; widget_test.dart
&#x251C;&#x2500;&#x2500; web
&#x2502;   &#x251C;&#x2500;&#x2500; favicon.png
&#x2502;   &#x251C;&#x2500;&#x2500; icons
&#x2502;   &#x251C;&#x2500;&#x2500; index.html
&#x2502;   &#x2514;&#x2500;&#x2500; manifest.json
&#x2514;&#x2500;&#x2500; windows
    &#x251C;&#x2500;&#x2500; CMakeLists.txt
    &#x251C;&#x2500;&#x2500; flutter
    &#x2514;&#x2500;&#x2500; runner

<span class="hljs-number">37</span> directories, <span class="hljs-number">27</span> files
jianguo@nutpi  %
</code></pre>
<h3 id="&#x914D;&#x7F6E;-pubspecyaml-&#x6587;&#x4EF6;"><a name="&#x914D;&#x7F6E;-pubspecyaml-&#x6587;&#x4EF6;" class="plugin-anchor" href="#&#x914D;&#x7F6E;-pubspecyaml-&#x6587;&#x4EF6;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x914D;&#x7F6E; pubspec.yaml &#x6587;&#x4EF6;</h3>
<p>&#x5728;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x4E2D;&#xFF0C;&#x53EF;&#x4EE5;&#x6DFB;&#x52A0;&#x9879;&#x76EE;&#x6240;&#x9700;&#x7684;&#x4F9D;&#x8D56;&#xFF0C;&#x5982; <code>flutter</code>&#x3001;<code>flutter_test</code> &#x7B49;&#x3002;&#x8FD8;&#x53EF;&#x4EE5;&#x914D;&#x7F6E;&#x5E94;&#x7528;&#x7684;&#x540D;&#x79F0;&#x3001;&#x7248;&#x672C;&#x53F7;&#x3001;&#x56FE;&#x6807;&#x7B49;&#x4FE1;&#x606F;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x4F9D;&#x8D56;&#x5E93;&#xFF0C;&#x53EA;&#x9700;&#x5728; <code>dependencies</code> &#x8282;&#x70B9;&#x4E0B;&#x6DFB;&#x52A0;&#x76F8;&#x5E94;&#x7684;&#x5E93;&#x540D;&#x79F0;&#x548C;&#x7248;&#x672C;&#x53F7;&#xFF0C;&#x7136;&#x540E;&#x6267;&#x884C; <code>flutter pub get</code> &#x547D;&#x4EE4;&#x6765;&#x83B7;&#x53D6;&#x548C;&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x3002;</p>
<h2 id="&#x56DB;&#x3001;&#x754C;&#x9762;&#x5F00;&#x53D1;"><a name="&#x56DB;&#x3001;&#x754C;&#x9762;&#x5F00;&#x53D1;" class="plugin-anchor" href="#&#x56DB;&#x3001;&#x754C;&#x9762;&#x5F00;&#x53D1;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x56DB;&#x3001;&#x754C;&#x9762;&#x5F00;&#x53D1;</h2>
<h3 id="&#x4F7F;&#x7528;-flutter-widgets-&#x6784;&#x5EFA;&#x754C;&#x9762;"><a name="&#x4F7F;&#x7528;-flutter-widgets-&#x6784;&#x5EFA;&#x754C;&#x9762;" class="plugin-anchor" href="#&#x4F7F;&#x7528;-flutter-widgets-&#x6784;&#x5EFA;&#x754C;&#x9762;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528; Flutter Widgets &#x6784;&#x5EFA;&#x754C;&#x9762;</h3>
<p>Flutter &#x63D0;&#x4F9B;&#x4E86;&#x4E30;&#x5BCC;&#x7684; Widgets&#xFF0C;&#x5982; <code>Container</code>&#x3001;<code>Row</code>&#x3001;<code>Column</code>&#x3001;<code>Text</code>&#x3001;<code>Button</code> &#x7B49;&#xFF0C;&#x901A;&#x8FC7;&#x7EC4;&#x5408;&#x8FD9;&#x4E9B; Widgets &#x53EF;&#x4EE5;&#x6784;&#x5EFA;&#x51FA;&#x5404;&#x79CD;&#x590D;&#x6742;&#x7684;&#x7528;&#x6237;&#x754C;&#x9762;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x6587;&#x672C;&#x548C;&#x6309;&#x94AE;&#x7684;&#x7B80;&#x5355;&#x754C;&#x9762;&#xFF1A;</p>
<h3 id="&#x9002;&#x914D;&#x9E3F;&#x8499;-pc-&#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;"><a name="&#x9002;&#x914D;&#x9E3F;&#x8499;-pc-&#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;" class="plugin-anchor" href="#&#x9002;&#x914D;&#x9E3F;&#x8499;-pc-&#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9002;&#x914D;&#x9E3F;&#x8499; PC &#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;</h3>
<p>&#x9E3F;&#x8499; PC &#x5E94;&#x7528;&#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x5E94;&#x9075;&#x5FAA;&#x9E3F;&#x8499;&#x7684;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;&#xFF0C;&#x63D0;&#x4F9B;&#x826F;&#x597D;&#x7684;&#x7528;&#x6237;&#x4F53;&#x9A8C;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x4F7F;&#x7528;&#x5408;&#x9002;&#x7684;&#x5B57;&#x4F53;&#x5927;&#x5C0F;&#x3001;&#x95F4;&#x8DDD;&#x3001;&#x989C;&#x8272;&#x7B49;&#xFF0C;&#x4EE5;&#x786E;&#x4FDD;&#x754C;&#x9762;&#x5728; PC &#x7AEF;&#x7684;&#x663E;&#x793A;&#x6548;&#x679C;&#x826F;&#x597D;&#x3002;&#x540C;&#x65F6;&#xFF0C;&#x8FD8;&#x9700;&#x8981;&#x8003;&#x8651;&#x54CD;&#x5E94;&#x5F0F;&#x5E03;&#x5C40;&#xFF0C;&#x4F7F;&#x5E94;&#x7528;&#x80FD;&#x591F;&#x9002;&#x5E94;&#x4E0D;&#x540C;&#x7684;&#x5C4F;&#x5E55;&#x5C3A;&#x5BF8;&#x548C;&#x5206;&#x8FA8;&#x7387;&#x3002;</p>
<h2 id="&#x4E94;&#x3001;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;"><a name="&#x4E94;&#x3001;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;" class="plugin-anchor" href="#&#x4E94;&#x3001;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E94;&#x3001;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;</h2>
<h3 id="&#x5904;&#x7406;&#x7528;&#x6237;&#x4EA4;&#x4E92;"><a name="&#x5904;&#x7406;&#x7528;&#x6237;&#x4EA4;&#x4E92;" class="plugin-anchor" href="#&#x5904;&#x7406;&#x7528;&#x6237;&#x4EA4;&#x4E92;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5904;&#x7406;&#x7528;&#x6237;&#x4EA4;&#x4E92;</h3>
<p>&#x901A;&#x8FC7;&#x4E3A;&#x754C;&#x9762;&#x5143;&#x7D20;&#x6DFB;&#x52A0;&#x4E8B;&#x4EF6;&#x5904;&#x7406;&#x51FD;&#x6570;&#xFF0C;&#x5982; <code>onPressed</code>&#x3001;<code>onTap</code> &#x7B49;&#xFF0C;&#x6765;&#x5904;&#x7406;&#x7528;&#x6237;&#x7684;&#x4EA4;&#x4E92;&#x64CD;&#x4F5C;&#x3002;&#x5728;&#x4E8B;&#x4EF6;&#x5904;&#x7406;&#x51FD;&#x6570;&#x4E2D;&#xFF0C;&#x53EF;&#x4EE5;&#x6267;&#x884C;&#x76F8;&#x5E94;&#x7684;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#xFF0C;&#x5982;&#x66F4;&#x65B0;&#x754C;&#x9762;&#x6570;&#x636E;&#x3001;&#x53D1;&#x8D77;&#x7F51;&#x7EDC;&#x8BF7;&#x6C42;&#x7B49;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x6309;&#x94AE;&#x70B9;&#x51FB;&#x540E;&#x663E;&#x793A;&#x63D0;&#x793A;&#x4FE1;&#x606F;&#x7684;&#x529F;&#x80FD;</p>
<pre><code class="lang-dart"><span class="hljs-keyword">import</span> <span class="hljs-string">&apos;package:flutter/material.dart&apos;</span>;

<span class="hljs-keyword">void</span> main() {
  runApp(<span class="hljs-keyword">const</span> MyApp());
}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyApp</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">StatelessWidget</span> </span>{
  <span class="hljs-keyword">const</span> MyApp({<span class="hljs-keyword">super</span>.key});

  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;Button Demo&apos;</span>),
        ),
        body: <span class="hljs-keyword">const</span> Center(
          child: MyButton(),
        ),
      ),
    );
  }
}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyButton</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">StatelessWidget</span> </span>{
  <span class="hljs-keyword">const</span> MyButton({<span class="hljs-keyword">super</span>.key});

  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> ElevatedButton(
      onPressed: () {
        <span class="hljs-built_in">print</span>(<span class="hljs-string">&apos;Button pressed&apos;</span>);
        showDialog(
          context: context,
          builder: (context) =&gt; AlertDialog(
            title: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;Button Pressed&apos;</span>),
            content: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;You pressed the button!&apos;</span>),
            actions: [
              TextButton(
                onPressed: () =&gt; Navigator.pop(context),
                child: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;OK&apos;</span>),
              ),
            ],
          ),
        );
      },
      child: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;Press Me&apos;</span>),
    );
  }
}
</code></pre>
<h3 id="&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;"><a name="&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;" class="plugin-anchor" href="#&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;</h3>
<p>&#x9E3F;&#x8499;&#x63D0;&#x4F9B;&#x4E86;&#x4E30;&#x5BCC;&#x7684;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#xFF0C;&#x5982;&#x6587;&#x4EF6;&#x7BA1;&#x7406;&#x3001;&#x8BBE;&#x5907;&#x4F20;&#x611F;&#x5668;&#x3001;&#x591A;&#x5A92;&#x4F53;&#x7B49;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; Flutter &#x7684;&#x5E73;&#x53F0;&#x901A;&#x9053;&#x8C03;&#x7528;&#x8FD9;&#x4E9B;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7684;&#x76F8;&#x518C;&#x9009;&#x62E9;&#x529F;&#x80FD;&#xFF0C;&#x83B7;&#x53D6;&#x7528;&#x6237;&#x9009;&#x62E9;&#x7684;&#x56FE;&#x7247;&#x5E76;&#x663E;&#x793A;&#x5728;&#x754C;&#x9762;&#x4E0A;&#x3002;&#x9700;&#x8981;&#x5148;&#x5728; <code>pubspec.yaml</code> &#x6587;&#x4EF6;&#x4E2D;&#x6DFB;&#x52A0;&#x76F8;&#x5E94;&#x7684;&#x4F9D;&#x8D56;&#xFF0C;&#x7136;&#x540E;&#x5728;&#x4EE3;&#x7801;&#x4E2D;&#x901A;&#x8FC7; <code>MethodChannel</code> &#x4E0E;&#x539F;&#x751F;&#x4EE3;&#x7801;&#x8FDB;&#x884C;&#x901A;&#x4FE1;&#xFF0C;&#x5B9E;&#x73B0;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x7684;&#x8C03;&#x7528;&#x3002;&#x4EE5;&#x53CA;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x9E3F;&#x8499;&#x7248;Flutter&#x7684;&#x4E09;&#x65B9;&#x5E93;&#x53BB;&#x5F00;&#x53D1;&#x3002;</p>
<pre><code class="lang-dart"><span class="hljs-keyword">import</span> <span class="hljs-string">&apos;package:flutter/material.dart&apos;</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">&apos;package:flutter/services.dart&apos;</span>;

<span class="hljs-keyword">void</span> main() {
  runApp(<span class="hljs-keyword">const</span> MyApp());
}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MyApp</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">StatelessWidget</span> </span>{
  <span class="hljs-keyword">const</span> MyApp({<span class="hljs-keyword">super</span>.key});

  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;System Ability Demo&apos;</span>),
        ),
        body: <span class="hljs-keyword">const</span> Center(
          child: MySystemAbilityButton(),
        ),
      ),
    );
  }
}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">MySystemAbilityButton</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">StatelessWidget</span> </span>{
  <span class="hljs-keyword">const</span> MySystemAbilityButton({<span class="hljs-keyword">super</span>.key});

  <span class="hljs-keyword">final</span> MethodChannel _channel = <span class="hljs-keyword">const</span> MethodChannel(<span class="hljs-string">&apos;com.example/system_ability&apos;</span>);

  <span class="hljs-meta">@override</span>
  Widget build(BuildContext context) {
    <span class="hljs-keyword">return</span> ElevatedButton(
      onPressed: () <span class="hljs-keyword">async</span> {
        <span class="hljs-keyword">try</span> {
          <span class="hljs-keyword">final</span> result = <span class="hljs-keyword">await</span> _channel.invokeMethod(<span class="hljs-string">&apos;invokeSystemAbility&apos;</span>);
          <span class="hljs-built_in">print</span>(<span class="hljs-string">&apos;System ability result: $result&apos;</span>);
        } <span class="hljs-keyword">catch</span> (e) {
          <span class="hljs-built_in">print</span>(<span class="hljs-string">&apos;Error invoking system ability: $e&apos;</span>);
        }
      },
      child: <span class="hljs-keyword">const</span> Text(<span class="hljs-string">&apos;Invoke System Ability&apos;</span>),
    );
  }
}
</code></pre>
<h2 id="&#x516D;&#x3001;&#x8C03;&#x8BD5;&#x4E0E;&#x6D4B;&#x8BD5;"><a name="&#x516D;&#x3001;&#x8C03;&#x8BD5;&#x4E0E;&#x6D4B;&#x8BD5;" class="plugin-anchor" href="#&#x516D;&#x3001;&#x8C03;&#x8BD5;&#x4E0E;&#x6D4B;&#x8BD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x516D;&#x3001;&#x8C03;&#x8BD5;&#x4E0E;&#x6D4B;&#x8BD5;</h2>
<h3 id="&#x4F7F;&#x7528;-flutter-devtools-&#x8C03;&#x8BD5;"><a name="&#x4F7F;&#x7528;-flutter-devtools-&#x8C03;&#x8BD5;" class="plugin-anchor" href="#&#x4F7F;&#x7528;-flutter-devtools-&#x8C03;&#x8BD5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528; Flutter DevTools &#x8C03;&#x8BD5;</h3>
<p>Flutter &#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x5F3A;&#x5927;&#x7684;&#x8C03;&#x8BD5;&#x5DE5;&#x5177; Flutter DevTools&#xFF0C;&#x5B83;&#x53EF;&#x4EE5;&#x5E2E;&#x52A9;&#x5F00;&#x53D1;&#x8005;&#x5206;&#x6790;&#x548C;&#x8C03;&#x8BD5;&#x5E94;&#x7528;&#x7684;&#x6027;&#x80FD;&#x3001;&#x5185;&#x5B58;&#x4F7F;&#x7528;&#x3001;Widget &#x6811;&#x7B49;&#x95EE;&#x9898;&#x3002;&#x5728;&#x5F00;&#x53D1;&#x8FC7;&#x7A0B;&#x4E2D;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <code>flutter run -- Observatory</code> &#x542F;&#x52A8; DevTools&#xFF0C;&#x5E76;&#x8FDE;&#x63A5;&#x5230;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x5E94;&#x7528;&#x8FDB;&#x884C;&#x8C03;&#x8BD5;&#x3002;</p>
<h3 id="&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;"><a name="&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;" class="plugin-anchor" href="#&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;</h3>
<p>&#x4E3A;&#x4E86;&#x786E;&#x4FDD;&#x5E94;&#x7528;&#x7684;&#x8D28;&#x91CF;&#x548C;&#x7A33;&#x5B9A;&#x6027;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; Flutter &#x63D0;&#x4F9B;&#x7684;&#x6D4B;&#x8BD5;&#x6846;&#x67B6;&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;&#x3002;&#x6D4B;&#x8BD5;&#x7C7B;&#x578B;&#x5305;&#x62EC;&#x5355;&#x5143;&#x6D4B;&#x8BD5;&#x3001;&#x5C0F;&#x90E8;&#x4EF6;&#x6D4B;&#x8BD5;&#x548C;&#x96C6;&#x6210;&#x6D4B;&#x8BD5;&#x7B49;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x7F16;&#x5199;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x7684;&#x5355;&#x5143;&#x6D4B;&#x8BD5;&#x6765;&#x9A8C;&#x8BC1;&#x67D0;&#x4E2A;&#x51FD;&#x6570;&#x7684;&#x8FD4;&#x56DE;&#x503C;&#x662F;&#x5426;&#x6B63;&#x786E;&#x3002;</p>
<pre><code class="lang-dart"><span class="hljs-keyword">import</span> <span class="hljs-string">&apos;package:test/test.dart&apos;</span>;

<span class="hljs-keyword">void</span> main() {
  test(<span class="hljs-string">&apos;calculate function returns correct value&apos;</span>, () {
    expect(calculate(<span class="hljs-number">2</span>, <span class="hljs-number">3</span>), <span class="hljs-number">5</span>);
  });
}

<span class="hljs-built_in">int</span> calculate(<span class="hljs-built_in">int</span> a, <span class="hljs-built_in">int</span> b) {
  <span class="hljs-keyword">return</span> a + b;
}
</code></pre>
<h2 id="&#x4E03;&#x3001;&#x6CE8;&#x610F;&#x70B9;"><a name="&#x4E03;&#x3001;&#x6CE8;&#x610F;&#x70B9;" class="plugin-anchor" href="#&#x4E03;&#x3001;&#x6CE8;&#x610F;&#x70B9;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E03;&#x3001;&#x6CE8;&#x610F;&#x70B9;</h2>
<p>&#x5927;&#x5BB6;&#x521B;&#x5EFA;&#x7684;&#x9879;&#x76EE;&#xFF0C;&#x9ED8;&#x8BA4;&#x662F;&#x4E0D;&#x652F;&#x6301;pc&#x8BBE;&#x5907;&#x7684;&#xFF0C;&#x6240;&#x4EE5;&#x9700;&#x8981;&#x5728;ohos&#x76EE;&#x5F55;&#x7684;&#x914D;&#x7F6E;&#x4E2D;&#x6DFB;&#x52A0;</p>
<pre><code class="lang-js">   <span class="hljs-string">&quot;deviceTypes&quot;</span>: [
      <span class="hljs-string">&quot;2in1&quot;</span>
    ],
</code></pre>
<p>&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x9002;&#x914D;&#x9E3F;&#x8499;PC&#x3002;</p>
<h2 id="&#x516B;&#x3001;&#x76F8;&#x5173;&#x94FE;&#x63A5;"><a name="&#x516B;&#x3001;&#x76F8;&#x5173;&#x94FE;&#x63A5;" class="plugin-anchor" href="#&#x516B;&#x3001;&#x76F8;&#x5173;&#x94FE;&#x63A5;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x516B;&#x3001;&#x76F8;&#x5173;&#x94FE;&#x63A5;</h2>
<p><a href="https://www.nutpi.net/?tagId=46883630868679" target="_blank">&#x575A;&#x679C;&#x6D3E;</a></p>
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-pc-guide" target="_blank">PC/2in1&#x5F00;&#x53D1;&#x5B9E;&#x8DF5;</a></p>
<p><a href="https://gitcode.com/openharmony-sig/flutter_flutter/" target="_blank">flutter_flutter</a></p>
<p><a href="https://gitcode.com/openharmony-sig/flutter_packages" target="_blank">flutter_packages</a></p>
<p><a href="https://gitcode.com/openharmony-sig/flutter_samples/" target="_blank">flutter_samples</a></p>
<p><a href="https://docs.qq.com/sheet/DYnl1dUxhV21JTWNl?tab=BB08J2" target="_blank">&#x575A;&#x679C;&#x6D3E;&#x4E09;&#x65B9;&#x5E93;&#x6C47;&#x603B;</a></p>
<p>&#x6B22;&#x8FCE;&#x5927;&#x5BB6;&#x4E00;&#x8D77;&#x5171;&#x5EFA;&#x3002;</p>
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-pc-guide#section583511558587" target="_blank">&#x5E03;&#x5C40;&#x8BBE;&#x8BA1;</a>&#xFF1A;&#x8BBE;&#x8BA1;&#x5408;&#x7406;&#x7F8E;&#x89C2;&#x7684;&#x9488;&#x5BF9;&#x6027;&#x5E03;&#x5C40;&#xFF0C;&#x5145;&#x5206;&#x5229;&#x7528;&#x5927;&#x5C3A;&#x5BF8;&#x5C4F;&#x5E55;&#xFF0C;&#x540C;&#x65F6;&#x5C55;&#x793A;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#x3002;</p>
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-pc-guide#section17328172392610" target="_blank">&#x7A97;&#x53E3;&#x9002;&#x914D;</a>&#xFF1A;&#x901A;&#x8FC7;&#x652F;&#x6301;PC/2in1&#x7684;&#x81EA;&#x7531;&#x7A97;&#x53E3;&#xFF0C;&#x6EE1;&#x8DB3;&#x7528;&#x6237;&#x7684;&#x591A;&#x6837;&#x5316;&#x4F53;&#x9A8C;&#x3002;</p>
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-pc-guide#section1634505165912" target="_blank">&#x4EA4;&#x4E92;&#x4F53;&#x9A8C;</a>&#xFF1A;&#x5728;&#x5E94;&#x7528;&#x4E2D;&#x589E;&#x52A0;&#x952E;&#x9F20;&#x7684;&#x4EA4;&#x4E92;&#x4F53;&#x9A8C;&#x652F;&#x6301;&#x3002;</p>
<p><a href="https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-pc-guide#section109821524194213" target="_blank">&#x7279;&#x6B8A;&#x4E8B;&#x9879;</a>&#xFF1A;&#x82E5;&#x5E94;&#x7528;&#x4E2D;&#x6D89;&#x53CA;&#x76F8;&#x673A;&#x8C03;&#x7528;&#xFF0C;&#x9700;&#x8981;&#x6CE8;&#x610F;&#x5728;PC/2in1&#x4E0A;&#x7684;&#x4E0D;&#x540C;&#x573A;&#x666F;&#x548C;&#x6444;&#x50CF;&#x5934;&#x652F;&#x6301;&#x60C5;&#x51B5;&#x3002;</p>
<h2 id="&#x4E5D;&#x3001;&#x603B;&#x7ED3;"><a name="&#x4E5D;&#x3001;&#x603B;&#x7ED3;" class="plugin-anchor" href="#&#x4E5D;&#x3001;&#x603B;&#x7ED3;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E5D;&#x3001;&#x603B;&#x7ED3;</h2>
<p>&#x672C;&#x6587;&#x8BE6;&#x7EC6;&#x4ECB;&#x7ECD;&#x4E86;&#x5982;&#x4F55;&#x4F7F;&#x7528; Flutter &#x5F00;&#x53D1;&#x9E3F;&#x8499; PC &#x5E94;&#x7528;&#x3002;&#x4ECE;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x642D;&#x5EFA;&#x5F00;&#x59CB;&#xFF0C;&#x5305;&#x62EC;&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#x8F6F;&#x4EF6;&#x3001;&#x914D;&#x7F6E; Flutter SDK &#x7B49;&#x6B65;&#x9AA4;&#xFF0C;&#x4E3A;&#x5F00;&#x53D1;&#x505A;&#x597D;&#x524D;&#x671F;&#x51C6;&#x5907;&#x3002;&#x63A5;&#x7740;&#x8BB2;&#x8FF0;&#x4E86;&#x5982;&#x4F55;&#x521B;&#x5EFA;&#x9879;&#x76EE;&#xFF0C;&#x4ECB;&#x7ECD;&#x4E86;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#x4E0E;&#x914D;&#x7F6E;&#xFF0C;&#x5F3A;&#x8C03;&#x4E86; pubspec.yaml &#x6587;&#x4EF6;&#x7684;&#x91CD;&#x8981;&#x6027;&#x3002;&#x5728;&#x754C;&#x9762;&#x5F00;&#x53D1;&#x90E8;&#x5206;&#xFF0C;&#x8BB2;&#x89E3;&#x4E86;&#x4F7F;&#x7528; Flutter Widgets &#x6784;&#x5EFA;&#x754C;&#x9762;&#x7684;&#x65B9;&#x6CD5;&#xFF0C;&#x5E76;&#x6307;&#x51FA;&#x8981;&#x9002;&#x914D;&#x9E3F;&#x8499; PC &#x7684;&#x754C;&#x9762;&#x8BBE;&#x8BA1;&#x89C4;&#x8303;&#x3002;&#x4E1A;&#x52A1;&#x903B;&#x8F91;&#x5F00;&#x53D1;&#x65B9;&#x9762;&#xFF0C;&#x9610;&#x8FF0;&#x4E86;&#x5904;&#x7406;&#x7528;&#x6237;&#x4EA4;&#x4E92;&#x548C;&#x8C03;&#x7528;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x80FD;&#x529B;&#x7684;&#x65B9;&#x5F0F;&#x3002;&#x8C03;&#x8BD5;&#x4E0E;&#x6D4B;&#x8BD5;&#x90E8;&#x5206;&#x5219;&#x4ECB;&#x7ECD;&#x4E86; Flutter DevTools &#x7684;&#x4F7F;&#x7528;&#x548C;&#x7F16;&#x5199;&#x6D4B;&#x8BD5;&#x7528;&#x4F8B;&#x7684;&#x65B9;&#x6CD5;&#x3002;&#x6700;&#x540E;&#xFF0C;&#x8FD8;&#x7ED9;&#x51FA;&#x4E86;&#x76F8;&#x5173;&#x7684;&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#x548C;&#x94FE;&#x63A5;&#xFF0C;&#x4EE5;&#x53CA;&#x4ECB;&#x7ECD;&#x4E86;&#x575A;&#x679C;&#x6D3E;&#x56E2;&#x961F;&#x53CA;&#x5176;&#x8D44;&#x6E90;&#xFF0C;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x63D0;&#x4F9B;&#x4E86;&#x4E30;&#x5BCC;&#x7684;&#x53C2;&#x8003;&#x8D44;&#x6599;&#x548C;&#x5B9E;&#x8DF5;&#x6307;&#x5BFC;&#xFF0C;&#x52A9;&#x529B;&#x5F00;&#x53D1;&#x8005;&#x987A;&#x5229;&#x521B;&#x5EFA;&#x9E3F;&#x8499; PC &#x5E94;&#x7528;&#x3002;</p>
<h2 id="&#x575A;&#x679C;&#x6D3E;"><a name="&#x575A;&#x679C;&#x6D3E;" class="plugin-anchor" href="#&#x575A;&#x679C;&#x6D3E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x575A;&#x679C;&#x6D3E;</h2>
<p>&#x575A;&#x679C;&#x6D3E;&#x7531;&#x575A;&#x679C;&#x7B49;&#x4EBA;&#x521B;&#x5EFA;&#xFF0C;&#x56E2;&#x961F;&#x62E5;&#x6709;&#x82E5;&#x5E72;&#x534E;&#x4E3A;HDE&#xFF0C;&#x4EE5;&#x53CA;&#x82E5;&#x5E72;&#x5176;&#x4ED6;&#x9886;&#x57DF;&#x7684;&#x4E09;&#x5341;&#x4F59;&#x4F4D;&#x4E07;&#x7C89;&#x535A;&#x4E3B;&#x8FD0;&#x8425;&#x3002;&#x4E13;&#x6CE8;&#x4E8E;&#x5206;&#x4EAB;&#x7684;&#x6280;&#x672F;&#x5305;&#x62EC;HarmonyOS/OpenHarmony&#xFF0C;ArkUI-X&#xFF0C;&#x5143;&#x670D;&#x52A1;&#xFF0C;&#x670D;&#x52A1;&#x5361;&#x7247;&#xFF0C;&#x4ED3;&#x9889;&#xFF0C;BlueOS&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x3001;&#x56E2;&#x961F;&#x6210;&#x5458;&#x805A;&#x96C6;&#x5728;&#x5317;&#x4EAC;&#x3001;&#x4E0A;&#x6D77;&#x3001;&#x5E7F;&#x5DDE;&#x3001;&#x6DF1;&#x5733;&#x3001;&#x5357;&#x4EAC;&#x3001;&#x676D;&#x5DDE;&#x3001;&#x82CF;&#x5DDE;&#x3001;&#x5B81;&#x590F;&#xFF0C;&#x5929;&#x6D25;&#xFF0C;&#x798F;&#x5EFA;&#xFF0C;&#x6B66;&#x6C49;&#x7B49;&#x5730;&#x3002; &#x805A;&#x7126;&#x201C;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;&#x201D;&#x3001;&#x201C;&#x667A;&#x80FD;&#x7269;&#x8054;&#x201D;&#x548C;&#x201C;AI&#x8D4B;&#x80FD;&#x201D;&#x3001;&#x201C;&#x4EBA;&#x5DE5;&#x667A;&#x80FD;&#x201D;&#x56DB;&#x5927;&#x4E1A;&#x52A1;&#x9886;&#x57DF;&#xFF0C;&#x4F9D;&#x6258;&#x534E;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x4E13;&#x5BB6;&#x7B49;&#x5F3A;&#x5927;&#x7684;&#x6280;&#x672F;&#x56E2;&#x961F;&#xFF0C;&#x4EE5;&#x53CA;&#x6DB5;&#x76D6;&#x9700;&#x6C42;&#x3001;&#x5F00;&#x53D1;&#x3001;&#x6D4B;&#x8BD5;&#x3001;&#x8FD0;&#x7EF4;&#x4E8E;&#x4E00;&#x4F53;&#x7684;&#x7EFC;&#x5408;&#x670D;&#x52A1;&#x4F53;&#x7CFB;&#xFF0C;&#x8D4B;&#x80FD;&#x6587;&#x65C5;&#x3001;&#x5A92;&#x4F53;&#x3001;&#x793E;&#x4EA4;&#x3001;&#x5BB6;&#x5C45;&#x3001;&#x6D88;&#x8D39;&#x7535;&#x5B50;&#x7B49;&#x884C;&#x4E1A;&#x5BA2;&#x6237;&#xFF0C;&#x6EE1;&#x8DB3;&#x793E;&#x533A;&#x5BA2;&#x6237;&#x6570;&#x5B57;&#x5316;&#x5347;&#x7EA7;&#x8F6C;&#x578B;&#x7684;&#x9700;&#x6C42;&#xFF0C;&#x5E2E;&#x52A9;&#x5BA2;&#x6237;&#x5B9E;&#x73B0;&#x4EF7;&#x503C;&#x63D0;&#x5347;&#x3002; &#x76EE;&#x524D;&#x4E0A;&#x67B6;&#x9E3F;&#x8499;&#x539F;&#x751F;&#x5E94;&#x7528;40&#x6B3E;&#xFF0C;&#x4E09;&#x65B9;&#x5E93;80&#x4E2A;&#x3002;&#x5B98;&#x7F51;&#xFF1A;<a href="https://www.nutpi.net/&#xFF0C;" target="_blank">https://www.nutpi.net/&#xFF0C;</a></p>
<h2 id="&#x4EE3;&#x7801;&#x6258;&#x7BA1;&#x5E73;&#x53F0;"><a name="&#x4EE3;&#x7801;&#x6258;&#x7BA1;&#x5E73;&#x53F0;" class="plugin-anchor" href="#&#x4EE3;&#x7801;&#x6258;&#x7BA1;&#x5E73;&#x53F0;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4EE3;&#x7801;&#x6258;&#x7BA1;&#x5E73;&#x53F0;</h2>
<p><a href="https://atomgit.com/nutpi" target="_blank">Atomgit</a></p>
<p><a href="https://gitcode.com/nutpi" target="_blank">Gitcode</a></p>
<p><a href="https://giteee.com/nutpi" target="_blank">Gitee</a></p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-05-16 06:58:55
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="14.2使用url_launcher.html"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 14.2使用url_launcher"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="14.4探索适用于鸿蒙原生应用的跨平台开发框架.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 14.4探索适用于鸿蒙原生应用的跨平台开发框架"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"14.3flutter开发鸿蒙PC应用","level":"1.14.3","depth":2,"next":{"title":"14.4探索适用于鸿蒙原生应用的跨平台开发框架","level":"1.14.4","depth":2,"path":"chapter14/14.4探索适用于鸿蒙原生应用的跨平台开发框架.md","ref":"./chapter14/14.4探索适用于鸿蒙原生应用的跨平台开发框架.md","articles":[]},"previous":{"title":"14.2使用url_launcher","level":"1.14.2","depth":2,"path":"chapter14/14.2使用url_launcher.md","ref":"./chapter14/14.2使用url_launcher.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.nutpi.net/","name":"坚果派官网"},{"target":"_blank","url":"https://www.arkui.club/","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"哔哩哔哩"},{"target":"_blank","url":"https://gitcode.com/nutpi","name":"GitCode"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"Flutter for Harmony教程","language":"zh-hans","gitbook":"*","description":"Flutter for Harmony电子书教程"},"file":{"path":"chapter14/14.3flutter开发鸿蒙PC应用.md","mtime":"2025-05-15T22:58:55.255Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-05-23T02:48:55.492Z"},"basePath":"..","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

